let str = process.argv[2];
//传入参数是emhhbmdzYWe6MTIz

//得到buffer实例
let buf = Buffer.from(str, "base64");
//转换成utf-8字符串
let utf8Str = buf.toString("utf-8");

console.log(utf8Str);

//进行字符串分割提取
let arr = utf8Str.split(":");
console.log({ "userName": arr[0], "pwd": arr[1] });

//buf.write写入操作
//buf.toString 转换为字符串
//buffer.contcat拼接操作
// buffer.slice裁剪操作